const importFn = require.context('./', false, /\.vue$/)
export default {
  install(Vue) {
    importFn.keys().forEach(path => {
      // 地址传入导入函数，将组件对象传给component
      const component = importFn(path).default
      //  将组件对象注册
      Vue.component(component.name, component)
    })
  }
}
